Skip to content

fix: correct typos in error messages and guard empty coordinate extraction - #300

Open
fix2015 wants to merge 1 commit into
askui:mainfrom
fix2015:fix/typos-and-error-handling
Open

fix: correct typos in error messages and guard empty coordinate extraction#300
fix2015 wants to merge 1 commit into
askui:mainfrom
fix2015:fix/typos-and-error-handling

Conversation

@fix2015

@fix2015 fix2015 commented Jul 27, 2026

Copy link
Copy Markdown

Summary

  • Fixed typo "on of""one of" in two error messages in ppadb_agent_os.py (lines 439, 450)
  • Removed extra double space in the second error message
  • Added empty-match guard in extract_click_coordinates() in anthropic/utils.py to raise a clear ValueError instead of IndexError when no coordinates are found in the LLM response

Changes

src/askui/tools/android/ppadb_agent_os.py

  • Line 439: "did you call on of the set_device methods?""did you call one of the set_device methods?"
  • Line 450: "did you call on of the set_display methods?""did you call one of the set_display methods?"

src/askui/models/anthropic/utils.py

  • Added check: if re.findall() returns no matches, raise ValueError with descriptive message instead of crashing with IndexError on matches[-1]

Test plan

  • Verified typo fixes are correct
  • Verified the guard raises ValueError with a helpful message when no coordinates are found
  • No behavioral change for the happy path — when coordinates exist, function works identically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant